﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConfirmOrder.aspx.cs" Inherits="Home_ConfirmOrder" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>订单信息确认</title>
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/home.css" rel="stylesheet" type="text/css" />
    <link href="/css/patch.css" rel="stylesheet" type="text/css" />
    <!--#include file="~/Public/commonjs.shtml" -->
    <script type="text/javascript" src="/JsBase/AppHelper/AreaHelper.js"></script>
    <script type="text/javascript" src="/Home/Js/ConfirmOrder.js"></script>
    <script type="text/javascript">
        Address = <%=JSONHelper.ObjectToJson<List<UserAddressInfo>>(listOfAddress) %>;
        totalGoodsMoney =<%=totalGoodsMoney %>
        sendFee = <%=sendFee %>;
        Order = <%= JSONHelper.ObjectToJson<OrderInfo>(order) %>;
    </script>
</head>
<body>
     
  
 	 <!--#include file="~/Public/top.shtml" -->

     <!--main开始-->
     <div class="main w960 cb pr">
         <!--#include file="/Public/onlineqq.shtml" -->
       <div class="block1 mt10">
         <!--left-->
         <div class="m_left">
          <div class="cb mb10">
          <div class="left_bar_hot"></div>
           <div class="left_hot">
             <div class="white_bg">
              <!--#include file="~/AutoGenerate/list-hotgoods-words.shtml" -->
             </div>
             
             <div class="left_hot_list">
                 <!--#include file="~/AutoGenerate/list-hotgoods-pic.shtml" -->
             </div>
           </div>
           
           <div class="left_bar_bottom"></div>
           </div>
         </div>
         <!--left end-->
         <!--right-->
         <div class="m_right ft">
            <p class="tar mr10">
              当前位置： <a href="/Home/ShoppingCarts.aspx">我的购物车</a> > <span class="fb f14 blue">填写订单核对信息</span>
            </p>
      
            <div class="area">
              <div class="area_top"></div>
              <div class="area_main">
								<div class="my_path cb">
                 <p class="my_car">我的购物车</p>
                 <p class="space_ico"></p>
                 <p class="my_infoON">填写核对订单信息</p>
                 <p class="space_ico"></p>
                 <p class="my_succes">成功提交订单</p>
               </div>
               <div class="other_title">
                 <h2 class="list_bg4 f14 pl30">收货人信息 </h2>

                  <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="my_center3 wh90 hui6">
                  <%
                     
                      for (int i = 0; i < listOfAddress.Count; ++i)
                      {
                          
                   %>
                  <tr>
                   <td align="left" class="pl5" colspan="2"><label for="rbAddress<%=i %>"><input id="rbAddress<%=i %>" type="radio" name="rbAddress" value="<%=i %>" <%=i==0?"checked":"" %> onclick="ChangeAddress(<%=i %>);"  /> <%=listOfAddress[i].AddressInfo.ReceiverName %>  
                   <%=listOfAddress[i].Area.Province.Name %><%=listOfAddress[i].Area.CityName %><%=listOfAddress[i].Area.Area.AreaName%><%=listOfAddress[i].AddressInfo.ReceiverAddress %></label></td>
                  </tr>
                   <%} %>

                   <tr>
                   <td align="left" class="pl5">收 货 人：</td>
                   <td align="left"><input name="txtReceiverName" type="text" id="txtReceiverName" size="25" value="<%=curAddress.AddressInfo.ReceiverName %>" class="border6"/>
      <span class="red">(*)</span></td>
                  </tr>
                  <tr>
                  <td align="left" class="pl5">所在地区：</td>
                  <td align="left"><select name="ddlProvince" id="ddlProvince" onchange="QueryCities(this.options[this.selectedIndex].value,'ddlCity');">
                      <option value="">-省份-</option>
                      <%=SelectOptionOfProvince%>
                  </select>
                  <select name="ddlCity" id="ddlCity"  onchange="QueryAreas(this.options[this.selectedIndex].value,'ddlArea');">
                    <option value="">-城市-</option>
                    <%=SelectOptionOfCity %>
                  </select>
                  <select name="ddlArea" id="ddlArea" onchange="ComputeSendFee();">
                    <option value="">-区域-</option>
                    <%=SelectOptionOfArea %>
                   </select>   <span class="red">(*)</span> 
                  </td>
                  </tr>
                  <tr>
                  <td align="left" class="pl5">收货地址：</td>
                  <td align="left"><span id="spArea"></span><input name="txtReceiverAddress" type="text" id="txtReceiverAddress" size="40" value="<%=curAddress.AddressInfo.ReceiverAddress %>" />
      <span class="red">(*)</span></td>
                  </tr>
                  <tr>
                  <td align="left" class="pl5">手机号码：</td>
                  <td align="left"><input name="txtReceiverMobile" type="text" id="txtReceiverMobile" size="25" value="<%=curAddress.AddressInfo.ReceiverMobile %>" /> 或固定电话：<input name="txtReceiverPhone" type="text" id="txtReceiverPhone" value="<%=curAddress.AddressInfo.ReceiverPhone %>" size="25" /></td>
                  </tr>
                <tr>
                  <td align="left" class="pl5">邮政编码：</td>
                  <td align="left"><input name="txtReceiverZipCode" type="text" id="txtReceiverZipCode" value="<%=curAddress.AddressInfo.ReceiverZipCode %>" size="25" /></td>
                  </tr>
              </table>

                 <h3>支付及配送方式</h3>
                 <ul class="payment">
                   <li>
                   支付方式：
                   </li>
                    <li>
                     <% for(int i=0;i<listOfPayMode.Count; ++i)
                        {
                      %>
                      <label for="rbPayMode<%=i %>"><input id="rbPayMode<%=i %>" type="radio" name="rbPayMode" value="<%=listOfPayMode[i].PayModeName %>" <%=i==0?"checked":"" %> /> <%=listOfPayMode[i].PayModeName %></label><br/>
                      <%
                        }
                       %>
                   
                   </li>
                 </ul>
                 <ul class="payment">
                   <li>
                   配送方式：
                   </li>
                    <li>
                    <% for(int i=0;i<listOfSendMode.Count; ++i)
                        {
                      %> 
                      <label for="rbSendMode<%=i %>"><input id="rbSendMode<%=i %>" type="radio" name="rbSendMode" value="<%=listOfSendMode[i].DeliveryID %>" <%=i==0?"checked":"" %> onclick="ComputeSendFee();" />  <%=listOfSendMode[i].DeliveryName %></label>
                       <input name="hfSendMode<%=i %>" type="hidden" id="hfSendMode<%=listOfSendMode[i].DeliveryID %>" value="<%=listOfSendMode[i].DeliveryName %>" onclick="ComputeSendFee();" /> 
                      <br/>
                      <%
                        }
                       %>
                   </li>
                 </ul>
               
                <h2 class="list_bg4 f14 pl30 cb">发票 </h2>
                 <ul class="payment mt20">
                   <li>
                   发票抬头： <input type="text" id="txtFaPiao" name="txtFaPiao" size="60" class="h25"/>
                   </li>
                   
                 </ul>
                  <h2 class="list_bg4 f14 pl30 cb">商品清单 </h2>
                
             </div>
               <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="my_center2 wh90 hui6">
                  <tr class="list_bg7">
                  <th height="38">商品编号</th>
                  <th>商品图片</th>
                  <th>商品名称</th>
                  <th>点客价</th>
                  <th>赠送积分</th>
                  <th>库存状态</th>
                  <th>数量</th>
                  </tr>
                  <%
                      if (listOfCarts != null)
                      {
                          for (int i = 0; i < listOfCarts.Count; ++i)
                          {
                              ShoppingCartInfo l = listOfCarts[i];
                  %>
                  <tr>
                  <td align="center" class="pl5"><%=l.CartInfo.GoodsID %></td>
                  <td align="center"><a href="/Goods/<%=l.CartInfo.GoodsID %>.html" target="_blank" title="<%=l.GoodsName %>"><img src="<%=l.SuperSmallPicture %>" /></a></td>
                  <td align="center" class="wh200"><a href="/Goods/<%=l.CartInfo.GoodsID %>.html" target="_blank" title="<%=l.GoodsName %>"><%=l.GoodsName %></a></td>
                  <td align="right" class="red_bold pr20"><%=Utility.FormatMoneyStr(l.CartInfo.Price) %>元</td>
                  <td align="center"><%=l.CartInfo.PresentScores %></td>
                  <td align="center">现货</td>
                  <td align="center"><%=l.CartInfo.Quantity %></td>
                  </tr>
                  <%}
                      }
                      else
                      { %>
                  <tr>
                  <td align="center" colspan="7" class="pl5">>[ 还没有选择商品，您可以去首页挑选喜欢的商品!  <a href="/" class="red">去首页</a> ]</td>
                  </tr>
                   <%} %>
              </table>
                <!--优惠券-->
				<h2 class="list_bg4 f14 pl30 cb">优惠券 </h2>

                
                <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="my_center3 wh90 hui6">
                  <%
                      if (listOfCoupon != null)
                      {
                          for (int i = 0; i < listOfCoupon.Count; ++i)
                          {
                          
                   %>
                  <tr>
                   <td align="left" class="pl5" colspan="2"><label for="rbCoupon<%=i %>"><input id="rbCoupon<%=i %>" type="radio" name="rbCoupon" value="<%=listOfCoupon[i].CouponID%>" onclick="UpdateMoney();"  /> <%=listOfCoupon[i].CouponID%> (<%=Math.Round(listOfCoupon[i].CouponMoney,0) %>元优惠券)
                   <input name="hfCoupon<%=listOfCoupon[i].CouponID%>" type="hidden" id="hfCoupon<%=listOfCoupon[i].CouponID%>" value="<%=listOfCoupon[i].CouponMoney %>" /> 
                   </label></td>
                  </tr>
                   <%}
                      }
                      else
                      { %>
                        <tr>
                   <td align="center" class="pl5" colspan="2">[ 无可用优惠券 ]</td>
                  </tr>

                      <%} %>
               </table>

        <div>
        
        </div>  
        <!--备注信息-->
        <h2 class="list_bg4 f14 pl30 cb">备注信息 </h2>
         <ul class="payment mt20">
                   <li>
                   请输入备注信息： <input type="text" id="txtRemark" size="60" name="txtRemark" class="h25"/>
                   </li>
                   
         </ul>
         
          <!--结算信息-->
        <h2 class="list_bg4 f14 pl30 cb">结算信息</h2>
         <ul class="payment mt20">
                   <li class="w600">
                   商品总价：￥<%=Utility.FormatMoneyStr(totalGoodsMoney) %> + 运费：￥<span id="spSendFee"><%=Utility.FormatMoneyStr(sendFee) %></span> - 使用优惠券：<span id="spCouponMoney">0.00</span>元 = 共计：￥<span id="spOrderMoney"><%=Utility.FormatMoneyStr(totalGoodsMoney+sendFee) %></span>元
                   </li>
         </ul>
         <div class="btn_submit3 cb"><input type="button" value="提交订单" onclick="SaveOrder();" /></div>
        
                     
    </div>
            <div class="area_bottom"></div>
            
            </div>
         
       </div>
         </div> 
         <!--right end-->
       </div>
        
     <!--new product-->
     <!--new product end-->
         <!--六个块-->
         <!--休闲食品-->
         <!---块结束-->
        
         
     </div>
     <!--main结束-->
      <div class="share cb w960">
        <div>
           <!--#include file="~/AutoGenerate/AllPage-Bottom-Banner.htm" -->
        </div>
          <!--#include file="~/Public/bottom-shopHelper.shtml" -->
     </div>
    
    <!--#include file="~/Public/bottom.shtml" -->


</body>
</html>
